package com.kaifamiao.iterator;

public class ForEachLoopTest {

	public static void main(String[] args) {
		
		int[] a = { 10 , 20 , 30 , 40 };
		
		for( int i = 0 ; i < a.length ; i++ ) {
			int x = a[ i ];
			System.out.println( x );
		}
		
		System.out.println( "- - - ".repeat( 5 ) );
		
		for( int x : a ) {
			System.out.println( x );
		}

	}

}
